package com.jxdinfo.hussar.example.mes.assess.service.impl;

import java.util.List;

import com.jxdinfo.hussar.example.common.utils.DateUtils;
import com.jxdinfo.hussar.example.mes.assess.dao.MesAssessOutputRecordMapper;
import com.jxdinfo.hussar.example.mes.assess.domain.MesAssessOutputRecord;
import com.jxdinfo.hussar.example.mes.assess.service.IMesAssessOutputRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 车间产量记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-16
 */
@Service
public class MesAssessOutputRecordServiceImpl implements IMesAssessOutputRecordService
{
    @Autowired
    private MesAssessOutputRecordMapper mesAssessOutputRecordMapper;

    /**
     * 查询车间产量记录
     * 
     * @param id 车间产量记录主键
     * @return 车间产量记录
     */
    @Override
    public MesAssessOutputRecord selectMesAssessOutputRecordById(Long id)
    {
        return mesAssessOutputRecordMapper.selectMesAssessOutputRecordById(id);
    }

    /**
     * 查询车间产量记录列表
     * 
     * @param mesAssessOutputRecord 车间产量记录
     * @return 车间产量记录
     */
    @Override
    public List<MesAssessOutputRecord> selectMesAssessOutputRecordList(MesAssessOutputRecord mesAssessOutputRecord)
    {
        return mesAssessOutputRecordMapper.selectMesAssessOutputRecordList(mesAssessOutputRecord);
    }

    /**
     * 新增车间产量记录
     * 
     * @param mesAssessOutputRecord 车间产量记录
     * @return 结果
     */
    @Override
    public int insertMesAssessOutputRecord(MesAssessOutputRecord mesAssessOutputRecord)
    {
        mesAssessOutputRecord.setCreateTime(DateUtils.getNowDate());
        return mesAssessOutputRecordMapper.insertMesAssessOutputRecord(mesAssessOutputRecord);
    }

    /**
     * 修改车间产量记录
     * 
     * @param mesAssessOutputRecord 车间产量记录
     * @return 结果
     */
    @Override
    public int updateMesAssessOutputRecord(MesAssessOutputRecord mesAssessOutputRecord)
    {
        mesAssessOutputRecord.setUpdateTime(DateUtils.getNowDate());
        return mesAssessOutputRecordMapper.updateMesAssessOutputRecord(mesAssessOutputRecord);
    }

    /**
     * 批量删除车间产量记录
     * 
     * @param ids 需要删除的车间产量记录主键
     * @return 结果
     */
    @Override
    public int deleteMesAssessOutputRecordByIds(Long[] ids)
    {
        return mesAssessOutputRecordMapper.deleteMesAssessOutputRecordByIds(ids);
    }

    /**
     * 删除车间产量记录信息
     * 
     * @param id 车间产量记录主键
     * @return 结果
     */
    @Override
    public int deleteMesAssessOutputRecordById(Long id)
    {
        return mesAssessOutputRecordMapper.deleteMesAssessOutputRecordById(id);
    }
}
